<%@page import="java.text.SimpleDateFormat"%>
<%@page import="Board.BoardVo"%>
<%@page import="java.util.ArrayList"%>
<%@page import="Board.BoardMyBa2"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>콘텐츠</title>
<link rel='stylesheet' href='${pageContext.request.contextPath}/FullCalendar/cupertino/jquery-ui.min.css' />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
<link href='${pageContext.request.contextPath}/FullCalendar/fullcalendar/fullcalendar.css' rel='stylesheet' />
<link href='${pageContext.request.contextPath}/FullCalendar/fullcalendar/fullcalendar.print.css' rel='stylesheet' media='print' />
<script src='${pageContext.request.contextPath}/FullCalendar/lib/jquery-ui.custom.min.js'></script>
<script src='${pageContext.request.contextPath}/FullCalendar/fullcalendar/fullcalendar.min.js'></script>
<style>
#cont_main{
	width:900px;
	margin:0 auto;
	font-family: 맑은고딕;
}
#cont_title{
	width:1100px;
	margin:0 auto;
	text-align: center;
}
/* #cont_title1{
	width:1000px;
	font-size:20px;
	font-weight: bold;
	text-align: center;
	color: #333333;
	padding:2px 5px;
	background-color: #ddffdd;
}
#cont_title2{
	width:1000px;
	font-size:14px;
	text-align: center;
	color: #888888;
	padding:2px 5px;
} */
#cont_top, #cont_bottom1,#cont_bottom2{
	width:900px;
	
}
#cont_top{
	font-size: 13px;
	font-weight: bold;
	
}
#cont_bottom1{
	font-size: 13px;
	
}
#cont_bottom2{
	font-size: 13px;
}

#top_cont{
	width:550px;
	float:left;
	text-align: center;
	background-color:#efefef;
	padding:3px 0;
	border-top: 1px solid #333333;
	border-bottom: 1px solid #333333;
	border-right: 1px solid #cccccc;
}
#top_writer{
	width:98px;
	float:left;
	text-align: center;
	background-color:#efefef;
	padding:3px 0;
	border-top: 1px solid #333333;
	border-bottom: 1px solid #333333;
	border-right: 1px solid #cccccc;
}
#top_date{
	width:149px;
	float:left;
	text-align: center;
	background-color:#efefef;
	padding:3px 0;
	border-top: 1px solid #333333;
	border-bottom: 1px solid #333333;
	border-right: 1px solid #cccccc;
}
#top_hit{
	width:100px;
	float:left;
	text-align: center;
	background-color:#efefef;
	padding:3px 0;
	border-top: 1px solid #333333;
	border-bottom: 1px solid #333333;
}

#bot_cont1{
	width:550px;
	float:left;
	text-align: center;
	/* background-color:#dddddd; */
	padding:2px 0;
	border-bottom: 1px solid #cccccc;
	border-right: 1px solid #cccccc;
	white-space: nowrap;
	overflow:hidden;
	text-overflow:ellipsis;
		
}
#bot_cont1 a{
	color:#333333;
	font-weight: bold;
	text-decoration: none;
}
#bot_cont1 a:hover{
	text-decoration: underline;
	font-weight: bold;
	color: #333333;
}
#bot_cont1 a:VISITED{
	color:#333333;
}
#bot_writer1{
	width:98px;
	float:left;
	text-align: center;
	/* background-color:#dddddd; */
	padding:2px 0;
	border-bottom: 1px solid #cccccc;
	border-right: 1px solid #cccccc;
}
#bot_date1{
	width:149px;
	float:left;
	text-align: center;
	/* background-color:#dddddd; */
	padding:2px 0;
	border-bottom: 1px solid #cccccc;
	border-right: 1px solid #cccccc;
}
#bot_hit1{
	width:100px;
	float:left;
	text-align: center;
	/* background-color:#dddddd; */
	padding:2px 0;
	border-bottom: 1px solid #cccccc;
	
}



#bot_cont2{
	width:550px;
	float:left;
	text-align: center;
	/* background-color:#eeffee; */
	padding:2px 0;
	border-bottom: 1px solid #cccccc;
	border-right: 1px solid #cccccc;
	white-space: nowrap;
	overflow:hidden;
	text-overflow:ellipsis;	
}
#bot_cont2 a{
	color:#333333;
	text-decoration: none;
}
#bot_cont2 a:hover{
	text-decoration: underline;
	color: #333333;
}
#bot_cont12 a:VISITED{
	color:#333333;
}

#bot_writer2{
	width:98px;
	float:left;
	text-align: center;
	/* background-color:#eeffff; */
	padding:2px 0;
	border-bottom: 1px solid #cccccc;
	border-right: 1px solid #cccccc;
}
#bot_date2{
	width:149px;
	float:left;
	text-align: center;
	/* background-color:#dddddd; */
	padding:2px 0;
	border-bottom: 1px solid #cccccc;
	border-right: 1px solid #cccccc;
}
#bot_hit2{
	width:100px;
	float:left;
	text-align: center;
	/* background-color:#dddddd; */
	padding:2px 0;
	border-bottom: 1px solid #cccccc;
	
}
#cont_calendar{
	width:900px;
	height:auto;
	margin:auto;
	/* background-color:#eeeeee; */
}



</style>
<script type="text/javascript">
	$(document)
			.ready(
					function() {
						var date = new Date();
						var d = date.getDate();
						var m = date.getMonth();
						var y = date.getFullYear();
						$('#cont_calendar')
								.fullCalendar(
										{
											theme : true,
											header : {
												left : "prev,next today",
												center : "title",
												right : "month,basicWeek"
											},
											titleFormat : {
												month : "yyyy년 MMMM",
												week : "[yyyy] MMM d일 ~ { [yyyy] MMM d일}",
												day : "yyyy년 MMM d일 dddd"
											},
											weekMode : 'variable',
											allDayDefault : true,
											editable : false,
											weekends : true,
											monthNames : [ "1월", "2월", "3월",
													"4월", "5월", "6월", "7월",
													"8월", "9월", "10월", "11월",
													"12월" ],
											monthNamesShort : [ "1월", "2월",
													"3월", "4월", "5월", "6월",
													"7월", "8월", "9월", "10월",
													"11월", "12월" ],
											dayNames : [ "일요일", "월요일", "화요일",
													"수요일", "목요일", "금요일", "토요일" ],
											dayNamesShort : [ "일", "월", "화",
													"수", "목", "금", "토" ],
											buttonText : {
												today : "오늘",
												month : "월별",
												week : "주별",
												day : "일별"
											},
											contentHeight : 600,
											events : '${pageContext.request.contextPath}/homepage/calendar/CalendarList.jsp'
										});
					});
</script>
<script>
function view(no){
	location.href = 'index.jsp?inc_content=./board/board_view.jsp&bo_no='+ no;
}

</script>
</head>
<body>
<jsp:useBean id="boardVo" class="Board.BoardVo" />
<jsp:setProperty property="*" name="boardVo" />
<%
BoardMyBa2 board = new BoardMyBa2();
board.setVo(boardVo);
ArrayList<BoardVo> lists = board.list();
ArrayList<BoardVo> lists2 = board.list2();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");
%>

<div style="height:20px;"></div>
<div style="height:20px;"></div>
<div id="cont_title">
	<img src='./main/images/img_news.jpg'>
	<!-- <div id="cont_title1">CLAMP NEWS</div>
	<div id="cont_title2">클램프의 최근 소식들을 확인하세요.</div> -->
</div>
<div style="height:10px;"></div>


<div id="cont_main">
	<div style="height:20px;"></div>
	<div id="cont_top">
		<div id="top_cont">내용</div>
		<div id="top_writer">작성자</div>
		<div id="top_date">작성일</div>
		<div id="top_hit">조회수</div>
	</div>
	<%
		for(int i=0; i<lists.size(); i++){
		BoardVo vo = lists.get(i);
	%>
	<div id="cont_bottom1">
		<div id="bot_cont1">
			<a href="#" onclick="view('<%=vo.getBo_no()%>','<%=vo.getBo_part()%>')">
				<%=vo.getBo_title() %>
			</a>
		</div>
		<div id="bot_writer1"><%=vo.getSa_nm() %></div>
		<div id="bot_date1"><%=sdf.format(vo.getRg_dt())%></div>
		<div id="bot_hit1"><%=vo.getBo_clicks()%></div>
	</div>
	<%} %>
	<%
		for(int i=0; i<lists2.size(); i++){
		BoardVo vo2 = lists2.get(i);
	%>
	<div id="cont_bottom2">
		<div id="bot_cont2">
			<a href="#" onclick="view('<%=vo2.getBo_no()%>')">
				<%=vo2.getBo_title() %>
			</a>
		</div>
		<div id="bot_writer2"><%=vo2.getSa_nm() %></div>
		<div id="bot_date2"><%=sdf.format(vo2.getRg_dt())%></div>
		<div id="bot_hit2"><%=vo2.getBo_clicks() %></div>
	</div>
	<%} %>
	
	<div style="clear:both;"></div>
	<div style="border-top:1px solid #333333;width:900px;"></div>
</div>
<div style="height:20px;"></div>
<div style="height:20px;"></div>
<div style="height:20px;"></div>
<div style="height:20px;"></div>
<div style="height:20px;"></div>
<!-- <div style="width:1100px;margin:0 auto;text-align:center;border:1px solid #dddddd;" align="center"> </div> -->
<!-- <div id="cont_title1">사내일정안내</div> -->
<div id="cont_title"><img src='./main/images/img_calendar.jpg'></div>
<div style="height:20px;"></div>
<div style="height:20px;"></div>
<div style="height:10px;"></div>


<div id="cont_calendar"></div>
<div style="height:15px;"></div>


</body>
</html>